Add Johannesburg Stock Exchange (JSE) holidays#3714
Conversation
Signed-off-by: Paresh Joshi <194076591+pareshjoshij@users.noreply.github.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughAdds Johannesburg Stock Exchange holiday support, including weekend filtering, Christmas Eve and New Year’s Eve half-days, public exports, registry discovery, README documentation, and tests for observed rules and 2025 holidays. ChangesJohannesburg Stock Exchange
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 5 files
Confidence score: 3/5
- In
tests/financial/test_johannesburg_stock_exchange.py,assertHalfDayNonObservedHolidayName(..."12-24"...)appears to ignore weekend holiday-shift behavior, so years like 2022/2023 can fail even when the calendar logic is correct; merging as-is risks flaky or consistently failing CI around those dates — update the test to account for SAT/SUN move rules (or assert against observed dates) before merging.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/financial/test_johannesburg_stock_exchange.py">
<violation number="1" location="tests/financial/test_johannesburg_stock_exchange.py:31">
P1: `self.assertHalfDayNonObservedHolidayName(name, (f"{year}-12-24" for year in self.full_range))` will fail for years where Dec 24 falls on Saturday/Sunday (e.g., 2022, 2023). The JSE's `_move_holiday(rule=SAT_SUN_TO_NONE)` removes weekend Christmas Eve dates during population — this runs regardless of the `observed` flag — so the non-observed instance also lacks those entries. Wrap this assertion with a weekend filter, or assert `assertHalfDayNonObservedHolidayName` only for weekday years and `assertNoHalfDayNonObservedHolidayName` for weekend years.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3714 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 321 322 +1
Lines 19320 19344 +24
Branches 2477 2479 +2
=========================================
+ Hits 19320 19344 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



Proposed change
This PR adds the holidays for the Johannesburg Stock Exchange (JSE) financial calendar.
Part of GSoC (#3424)
holidaysfunctionality in general)Checklist
make checklocally; all checks and tests passed.